<!doctype html>
<html lang="{{ .Site.LanguageCode }}">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>{{ block "title" . }}{{ if .IsHome }} {{ .Site.Title }} {{ else }} {{ .Title }} - {{ .Site.Title }} {{ end }}{{ end }}</title>
    <meta name="HandheldFriendly" content="True">
    <meta name="MobileOptimized" content="320">
    <meta name="referrer" content="no-referrer">
    <meta name="description" content="{{ .Description | default .Site.Params.description }}" />
    <meta property="og:site_name" content="{{ .Site.Title }}" />
    <meta property="og:locale" content="en_US" />
    <meta property="og:type" content="article" />
    <meta property="og:url" content="{{ .Permalink }}" />
    <meta property="og:title" content="{{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}" />
    <meta property="og:image" content="{{ .Site.BaseURL }}{{ .Params.meta_img | default .Site.Params.logofile }}" />
    <meta property="og:description" content="{{ .Description | default .Site.Params.description }}" />

    <meta name="twitter:card" content="{{ .Params.cardtype | default "summary_large_image" }}" />
    {{ if .Site.Params.twitter }}
    <meta name="twitter:site" content="@{{ .Site.Params.twitter }}">
    <meta name="twitter:creator" content="@{{ .Site.Params.twitter }}">
    {{ end }}
    <meta name="twitter:title" content="{{ .Title | default .Site.Title }}" />
    <meta name="twitter:description" content="{{ .Description | default .Site.Params.description }}" />
    <meta name="twitter:image" content="{{ .Site.BaseURL }}{{ .Params.meta_img | default .Site.Params.logofile }}" />

    <link rel="canonical" href="{{ .Permalink }}">

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha512-MoRNloxbStBcD8z3M/2BmnT+rg4IsMxPkXaGh2zD6LGNNFE80W3onsAhRcMAMrSoyWL9xD7Ert0men7vR8LUZg==" crossorigin="anonymous" />

    <link rel="stylesheet" href="https://nanx-assets.netlify.app/fonts.css" />

    <link rel="stylesheet" href="{{ .Site.BaseURL }}css/custom.css" />

    {{ if .Site.Params.highlightjs }}
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.2.0/styles/github-gist.min.css" integrity="sha512-od7JLoOTxM8w/HSKGzP9Kexc20K9p/M2zxSWsd7H1e4Ctf+8SQFtCWEZnW5u6ul5ehSECa5QmOk9ju2nQMmlVA==" crossorigin="anonymous" />
    {{ end }}

    {{ if .Site.Params.progressively }}
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/progressively/1.2.5/progressively.min.css" integrity="sha512-TdJkMXwjtS9Gb8rN919K1JVdUv2+q5YHsKXPtJGDP79t1Nd5oCZy5mFA6Nr85Dsp6wJ1SUQgOyHPDulLzTjDcQ==" crossorigin="anonymous" />
    {{ end }}

    <link rel="shortcut icon"
        href="{{ if .Site.Params.faviconfile }}{{ .Site.Params.faviconfile | absURL }}{{ else }}{{ .Site.BaseURL }}img/favicon.ico{{ end }}">

    {{ if .Site.RSSLink }}
    <link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
    {{ end }}
</head>

<body>
    {{ block "main" . }}{{ end }}

    {{/*
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" integrity="sha512-/DXTXr6nQodMUiq+IUJYCt2PPOUjrHJ9wFrqpJ3XkgPNOZVfMok7cRw6CSxyCQxXn6ozlESsSh1/sMCTF1rL/g==" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha512-M5KW3ztuIICmVIhjSqXe01oV2bpe248gOxqmlcYrEzAvws7Pw3z6BK0iGbrwvdrUQUhi3eXgtxp5I8PDo9YfjQ==" crossorigin="anonymous"></script>
    */}}

    {{ if .Site.Params.highlightjs }}
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.2.0/highlight.min.js" integrity="sha512-TDKKr+IvoqZnPzc3l35hdjpHD0m+b2EC2SrLEgKDRWpxf2rFCxemkgvJ5kfU48ip+Y+m2XVKyOCD85ybtlZDmw==" crossorigin="anonymous"></script>
        {{ range .Site.Params.highlightjslanguages }}
            <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.2.0/languages/{{.}}.min.js" defer></script>
        {{ end }}
        <script>
            window.addEventListener('load', function() {
                hljs.initHighlighting();
            }, true);
        </script>
    {{ end }}

    {{ if .Site.Params.progressively }}
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/progressively/1.2.5/progressively.min.css" integrity="sha512-TdJkMXwjtS9Gb8rN919K1JVdUv2+q5YHsKXPtJGDP79t1Nd5oCZy5mFA6Nr85Dsp6wJ1SUQgOyHPDulLzTjDcQ==" crossorigin="anonymous" />
        <script>
            window.addEventListener('load', function() {
                progressively.init({delay: 30, throttle: 50});
            }, true);
        </script>
    {{ end }}

    {{ template "_internal/google_analytics_async.html" . }}
    {{ if .Site.Params.uselatex }}
        {{ partial "footer_mathjax.html" . }}
    {{ end }}
</body>

</html>
